package com.elink.enginerring.file.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.elink.enginerring.common.BaseCo;
import com.elink.enginerring.file.entity.Comment;

/**
 * 文件资料库mapper
 * @author hxjxiaojun
 * @time 2016-9-20
 *
 */
public interface CommentMapper {
	int deleteByPrimaryKey(Integer commentId);

	int insert(Comment record);

	int insertSelective(Comment record);

	Comment selectByPrimaryKey(Integer commentId);

	int updateByPrimaryKeySelective(Comment record);

	int updateByPrimaryKey(Comment record);

	List<Comment> selectList(@Param("bc") BaseCo bc, @Param("type") String type);

	int selectCount(@Param("bc") BaseCo bc, @Param("type") String type);

	@Update("update  comment set auth_status = #{authStatus} where find_in_set(comment_id,#{ids})")
	void addAuth(@Param("ids")String ids,@Param("authStatus")int authStatus);
}